#include <fftw3.h>
#include <iostream>
using namespace std;

int main(int argc, char* argv[])
{
  	int N = 10;
    fftw_complex *in, *out;
    fftw_plan p;
    in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);
    out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);
    p = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE);

	for(int i = 0; i < N; i++)
	{
	  in[i][0] = 1.0;
	  in[i][1] = 0.0;
	}
    fftw_execute(p); /* repeat as needed */
	for(int i = 0; i < N; i++)
	{
	  cout<< "(" << out[i][0] << "," << out[i][1] << ")\t";
	}
	cout << endl;
	
	
	fftw_destroy_plan(p);
    fftw_free(in);
	fftw_free(out);
}

